package com.yuan.yblog.crud.entity;

import java.io.Serial;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
* @author hepeiyuan
* @date 2024-06-04
*/
@Data
@TableName("post")
@Schema(description = "文章表")
public class Post implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "文章标题")
    private String title;

    @Schema(description = "文章内容")
    private String content;

    @Schema(description = "编辑模式：html可视化，markdown ..")
    private String editMode;

    @Schema(description = "文章分类ID，小于等于0表示无分类")
    private Long categoryId;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "支持人数")
    private Integer voteUp;

    @Schema(description = "反对人数")
    private Integer voteDown;

    @Schema(description = "访问量")
    private Integer viewCount;

    @Schema(description = "评论数量")
    private Integer commentCount;

    @Schema(description = "是否精选，1精选，0非精选")
    private Integer recommend;

    @Schema(description = "文章等级，0最高置顶，最低100")
    private Integer level;

    @Schema(description = "状态，1表示有效，0表示删除")
    private Integer status;

    @Schema(description = "创建日期")
    private Date created;

    @Schema(description = "最后更新日期")
    private Date modified;

}